package com.lanmao.mall.controller;

import com.lanmao.mall.service.OrderService;
import com.lanmao.mall.util.ResultResponse;
import com.lanmao.mall.vo.OrderVO;
import io.swagger.v3.oas.annotations.Operation;
import io.swagger.v3.oas.annotations.tags.Tag;
import lombok.RequiredArgsConstructor;
import org.springframework.web.bind.annotation.GetMapping;
import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.bind.annotation.RestController;

import java.util.List;

/**
 * <p>
 * 订单 前端控制器
 * </p>
 *
 * @author lanmao
 * @since 2023-11-25
 */
@RestController
@RequestMapping("/order")
@RequiredArgsConstructor
@Tag(name = "订单")
public class OrderController {

    private final OrderService orderService;

    @GetMapping("/test")
    @Operation(summary = "测试")
    public ResultResponse<List<OrderVO>> test() {
        List<OrderVO> list = orderService.getList();
        return ResultResponse.success(list);
    }
}
